<!doctype html>
<html lang= "en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">



<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>我的课题</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link th:href="@{/assets/i/favicon.png}" rel="icon" type="image/png" href="../static/assets/i/favicon.png">
    <link th:href="@{/assets/i/app-icon72x72@2x.png}"  rel="apple-touch-icon-precomposed" href="../static/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link th:href="@{/assets/css/amazeui.min.css}" rel="stylesheet" href="../static/assets/css/amazeui.min.css" />
    <link th:href="@{/assets/css/admin.css}" rel="stylesheet" href="../static/assets/css/admin.css">
    <link th:href="@{/assets/css/app.css}" rel="stylesheet" href="../static/assets/css/app.css">
    <link th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css" rel="stylesheet">

    <link th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css" rel="stylesheet">


</head>

<body  style="">


<div th:replace="thead-top :: thead-top"></div>


<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover">
        <div class="tpl-left-nav-title">
            <font size="4">毕设管理系统</font>
        </div>
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <li class="tpl-left-nav-item">
                    <a href="index.php" class="nav-link active" th:href="@{/admin}">
                        <i class="am-icon-home"></i>
                        <span>首页</span>
                        <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                    </a>
                </li>
                <!--<li class="tpl-left-nav-item">-->
                <!--<a href="course.php" class="nav-link tpl-left-nav-link-list">-->
                <!--<i class="am-icon-book"></i>-->
                <!--<span>论文审评</span>-->
                <!--</a>-->
                <!--</li>-->
                <li class="tpl-left-nav-item">
                    <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-align-justify"></i>
                        <span>课题管理</span>
                        <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                    </a>
                    <ul class="tpl-left-nav-sub-menu" style="display: block;">
                        <li>
                            <a href="kadai.html" th:href="@{/admin/a_pending}">
                                <i class="am-icon-angle-right"></i>
                                <span>课题审核</span>
                            </a>

                            <a href="newKadai.html" th:href="@{/admin/a_kadai}">
                                <i class="am-icon-angle-right"></i>
                                <span>课题管理</span>
                            </a>


                        </li>
                    </ul>
                </li>

                <li class="tpl-left-nav-item">
                    <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-align-justify"></i>
                        <span>选题管理</span>
                        <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                    </a>
                    <ul class="tpl-left-nav-sub-menu" style="display: block;">
                        <li>

                            <a href="a_kadaiOpenAndClose.html" th:href="@{/admin/a_kadaiOpenAndClose}" >
                                <i class="am-icon-angle-right"></i>
                                <span>开启/关闭选题</span>
                            </a>

                            <a href="a_kadaiorder.html" th:href="@{/admin/a_kadaiorder}" >
                                <i class="am-icon-angle-right"></i>
                                <span>指定课题</span>
                            </a>


                        </li>
                    </ul>
                </li>

                <li class="tpl-left-nav-item">
                    <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-align-justify"></i>
                        <span>论文评审</span>
                        <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                    </a>
                    <ul class="tpl-left-nav-sub-menu" style="display: block;">
                        <li>
                            <a href="" th:href="@{/admin/areview}">
                                <i class="am-icon-angle-right"></i>
                                <span>安排开题交叉评阅</span>
                            </a>



                            <a href="" th:href="@{/admin/crossproposal}">
                                <i class="am-icon-angle-right"></i>
                                <span>安排论文交叉评阅</span>
                            </a>


                            <a href="#" th:href="@{/admin/allgrades}">
                                <i class="am-icon-angle-right"></i>
                                <span>学生成绩</span>
                            </a>

                        </li>
                    </ul>
                </li>

                <li class="tpl-left-nav-item">
                    <a href="javascript:;" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-align-justify"></i>
                        <span>用户管理</span>
                        <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                    </a>
                    <ul class="tpl-left-nav-sub-menu" style="display: block;">
                        <li>
                            <a href="#" th:href="@{/admin/newstudent}">
                                <i class="am-icon-angle-right"></i>
                                <span>添加学生</span>
                            </a>

                            <a href="#" th:href="@{/admin/newteacher}">
                                <i class="am-icon-angle-right"></i>
                                <span>添加老师</span>
                            </a>

                        </li>
                    </ul>
                </li>

            </ul>
        </div>
    </div>

    <div class="tpl-content-wrapper">
        <div class="tpl-content-page-title">
            <!--<?php

                  $course = getCourseInfo();
                   foreach($course as $k=>$val){
                         echo "{$val['course_name']}";
                  }

              ?>
              -->
        </div>
        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">管理员</a></li>
            <li><a href="#">课题管理</a></li>
            <li class="am-active">课题审核</li>
        </ol>
        <div class="tpl-portlet-components">

            <div class="tpl-block">
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-md-6">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">

                            </div>
                        </div>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form  th:action="@{/admin/a_FindTaskR}" action="/admin/a_FindTaskR"  method="post">
                        <div class="am-form-group">
                            <select id="tasktypeSelection" name="tasktypeSelection"class="form-control" >
                                <option value="全部" th:selected="${tasktypeSelection_D1}">--全部--</option>
                                <option value="系统设计" th:selected="${tasktypeSelection_D2}">系统设计</option>
                                <option value="算法设计" th:selected="${tasktypeSelection_D3}">算法设计</option>
                                <option value="软件开发" th:selected="${tasktypeSelection_D4}">软件开发</option>
                            </select>
                        </div>

                            <div class="am-u-sm-12 am-u-md-3">
                                   <span class="am-input-group-btn">
                                       <div class="am-input-group am-input-group-sm">
                                           <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="submit"></button>
                                       </div>
                                   </span>
                            </div>
                        </form>
                    </div>
                </div>

                <div class="am-g">
                    <div class="am-u-sm-12">

                        <!--审核模态框-->
                        <div class="modal fade" id="pandingModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" style="margin-top: 100px;">
                                <div class="modal-content" style="text-align:center;">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"
                                                aria-hidden="true">×
                                        </button>
                                        <h9 class="modal-title" id="myModalLabel">审核</h9>
                                    </div>
                                    <div class="modal-body">
                                        <p style="font-size: smaller;">确定通过该课题吗？</p>
                                        <form th:action="@{/admin/a_TaskPass}" action="/admin/a_TaskPass"  method="post">
                                            <input type="hidden" id="del_taskid" name="pass_taskid" value="pass_taskid"/>
                                            <button type="button" class="am-btn am-btn-primary" data-dismiss="modal">取消</button>
                                            <button type="submit" class="am-btn am-btn-primary" >确认</button>
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                    </div>
                                </div>
                            </div><!-- /.modal-content -->
                        </div><!-- /.modal-dialog -->

                        <!--查看详情模态框-->
                        <div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" style="margin-top: 100px;">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"
                                                aria-hidden="true">×
                                        </button>
                                        <h9 class="modal-title" id="myModalLabel">详情</h9>
                                    </div>
                                    <div class="modal-body">
                                        <form th:action="@{/admin/a_ShowTaskDetail}" action="/admin/a_TaskAppoint"  method="post">
                                            <input type="hidden" id="detail_task" name="detail_task" value="555"/>
                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="show_taskid">课题编号</label>
                                                <input type="text" id ="show_taskid" value="" readonly="readonly">
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="show_taskname">课题名称</label>
                                                <input type="text" id ="show_taskname" value="" readonly="readonly">
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="show_tutorname">课题导师</label>
                                                <input type="text" id ="show_tutorname" value="" readonly="readonly">
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="show_tasktype">课题类型</label>
                                                <input type="text" id ="show_tasktype" value="" readonly="readonly">
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="show_taskrate">课题级别</label>
                                                <input type="text" id ="show_taskrate" value="" readonly="readonly">
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="show_taskrate">可选人数</label>
                                                <input type="text" id ="show_taskmaxchoose" value="" readonly="readonly">
                                            </div>

                                            <div class="form-group form-inline">
                                                <label for="show_taskdescrib">课题描述</label>
                                                <input type="text" id ="show_taskdescrib" value="" readonly="readonly">
                                            </div>

                                            <button type="button" class="am-btn am-btn-primary" data-dismiss="modal">关闭</button>

                                            <!--<button type="submit" class="btn btn-primary" >确认</button>-->
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                    </div>
                                </div>
                            </div><!-- /.modal-content -->
                        </div><!-- /.modal-dialog -->

                        <!--编辑模态框-->
                        <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog" style="margin-top: 100px;">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal"
                                                aria-hidden="true">×
                                        </button>
                                        <h9 class="modal-title" id="myModalLabel"> 修改</h9>
                                    </div>
                                    <div class="modal-body">
                                        <form th:action="@{/teacher/edittask}" action="/teacher/edittask"  method="post">
                                            <!--<input type="hidden" id="taskid" name="taskid" value="111"/>-->
                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="edit_taskid">课题编号</label>
                                                <input type="text" id ="edit_taskid" name ="edit_taskid"value="" readonly="readonly" >
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="edit_taskname">课题名称</label>
                                                <input type="text" id ="edit_taskname" name ="edit_taskname"  value="" >
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label style="display: none" for="edit_tutorname">课题导师</label>
                                                <input style="display: none" type="text" id ="edit_tutorname" name="edit_tutorname" value="" readonly="readonly" >
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="edit_tasktype">课题类型</label>
                                                <input type="text" id ="edit_tasktype" name="edit_tasktype" value="" >
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="edit_taskrate">课题级别</label>
                                                <input type="text" id ="edit_taskrate" name="edit_taskrate" value="" >
                                            </div>

                                            <div class="form-group form-inline" style="margin-bottom: auto;">
                                                <label for="edit_taskrate">可选人数</label>
                                                <input type="text" id ="edit_taskmaxchoose" name="edit_taskmaxchoose" value="">
                                            </div>

                                            <div class="form-group form-inline">
                                                <label for="edit_taskdescrib">课题描述</label>
                                                <input type="text" id ="edit_taskdescrib" name ="edit_taskdescrib" value="">
                                            </div>

                                            <button type="button" class="am-btn am-btn-primary" data-dismiss="modal">关闭</button>
                                            <button type="submit" class="am-btn am-btn-primary" >确认</button>
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                    </div>
                                </div>
                            </div><!-- /.modal-content -->
                        </div><!-- /.modal-dialog -->

                        <table class="am-table am-table-striped am-table-hover table-main">
                                <thead>
                                <tr>
                                    <th class="table-check"><input type="checkbox" class="tpl-table-fz-check"></th>
                                    <th class="table-id">课程编号</th>
                                    <th class="table-title">课程名称</th>
                                    <th class="table-author am-hide-sm-only">导师</th>
                                    <th class="table-type">课程类型</th>
                                    <th class="table-type">状态</th>

                                    <th class="table-set">操作</th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr id ="task_tr" th:each="task,list:${initdata}">
                                    <td><input type="checkbox"></td>
                                    <!--<td id="table_id" th:text="${list.size+1}"></td>-->
                                    <td id="table_taskid" th:text="${task.taskid}" class="table_taskid" ></td>
                                    <td id="table_taskname" th:text="${task.taskname}"></td>
                                    <td id="table_tutorname" th:text="${task.tutorname}"></td>
                                    <td  id="table_tasktype" th:text="${task.tasktype}"></td>
                                    <td id="table_taskstate" th:text="${task.taskstate}"></td>

                                    <td style="display:none" id="table_taskrate" th:text="${task.taskrate}"></td>
                                    <td style="display:none" id="table_taskdescrib" th:text="${task.taskdescrib}"></td>
                                    <td style="display:none" id="table_taskmaxchoose" th:text="${task.taskmaxchoose}"></td>
                                    <td>
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button id="show" data-toggle='modal'  data-target='#detailModal' onclick="show(this)" class="am-btn am-btn-default am-btn-xs am-text-center"><span class="am-icon-angle-double-up"></span> 查看</button>
                                                <button class="am-btn am-btn-default am-btn-xs am-text-secondary" id="pass" data-toggle='modal' data-target='#pandingModal' onclick= "pass(this)";><span class="am-icon-pencil-square-o"></span> 审核</button>

                                            </div>
                                        </div>
                                    </td>
                                    <!--<td><button id="show" class='btn btn-link' data-toggle='modal'  data-target='#showModal' onclick="show(this)">查看详情</button></td>-->
                                    <!--<td><button id="pass" class='btn btn-link'  data-toggle='modal' data-target='#passModal' onclick="pass(this)" >通过</button></td>-->
                                </tr>



                                <script>
                                    function del(obj) {
                                        task = $(obj).parents("tr").find("#table_taskid").text();
                                        document.getElementById("del_taskid").value= task;
                                    }

                                    function all() {
                                        //alert(stu_id);

                                        window.location = 'action.php?action=del&stu_id='+stu_id;

                                    }
                                    function one() {
                                        //alert(stu_id);

                                        window.location = 'action.php?action=del&stu_id='+stu_id;

                                    }
                                    function two() {
                                        //alert(stu_id);

                                        window.location = 'action.php?action=del&stu_id='+stu_id;

                                    }
                                </script>

                                </tbody>
                            </table>
                            <div class="am-cf">

                                <div class="am-fr">
                                    <ul class="am-pagination tpl-pagination">
                                        <li class="am-disabled"><a href="#">«</a></li>
                                        <li class="am-active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">4</a></li>
                                        <li><a href="#">5</a></li>
                                        <li><a href="#">»</a></li>
                                    </ul>
                                </div>
                            </div>
                            <hr>

                        </form>
                    </div>

                </div>
            </div>
            <div class="tpl-alert"></div>
        </div>










    </div>

</div>


    <script type="text/javascript">

        function pass(obj) {
            task = $(obj).parents("tr").find("#table_taskid").text();
            document.getElementById("del_taskid").value= task;
        }
        /**
         * 删除课题
         */
        function del(obj) {
            task = $(obj).parents("tr").find("#table_taskid").text();
            document.getElementById("del_taskid").value= task;
        }
        /**
         * 查看课题详情
         */
        function show(obj) {
            // document.getElementById("edit_task").value=$(obj).parents("tr").find("#table_taskid").text();
            document.getElementById("show_taskid").value = $(obj).parents("tr").find("#table_taskid").text();
            document.getElementById("show_taskname").value = $(obj).parents("tr").find("#table_taskname").text();
            document.getElementById("show_tasktype").value = $(obj).parents("tr").find("#table_tasktype").text();
            document.getElementById("show_taskrate").value = $(obj).parents("tr").find("#table_taskrate").text();
            document.getElementById("show_tutorname").value = $(obj).parents("tr").find("#table_tutorname").text();
            document.getElementById("show_taskdescrib").value = $(obj).parents("tr").find("#table_taskdescrib").text();
            document.getElementById("show_taskmaxchoose").value = $(obj).parents("tr").find("#table_taskmaxchoose").text();
        }


    </script>

    <script th:src="@{/assets/js/jquery.min.js}" src="../static/assets/js/jquery.min.js"></script>
    <script th:src="@{/assets/js/amazeui.min.js}" src="../static/assets/js/amazeui.min.js"></script>
    <script th:src="@{/assets/js/app.js}" src="../static/assets/js/app.js"></script>

    <script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js"></script>
    <script th:src="@{/js/jquery-3.1.1.min.js}" src="../static/js/jquery-3.1.1.min.js"></script>
    <script th:src="@{/js/flat-ui.min.js}" src="../static/js/flat-ui.min.js"></script>

</body>

</html>
<script src="//cdn.bootcss.com/jquery/3.0.0-beta1/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jqgrid/4.6.0/js/i18n/grid.locale-en.js"></script>
<script src="//cdn.bootcss.com/jqgrid/4.6.0/js/jquery.jqGrid.min.js"></script>
